<template>
    <view class="search_contant">
        <image
          class="icon"
          src="@/static/img/busiImgs/icon_serch_title_list_16.png"
        ></image>
        <input class="searchvalue" type="text" v-model="searchvalue" :placeholder='placeholder' placeholder-style="font-size: 24rpx;font-family: PingFang SC, PingFang SC-Regular; font-weight: Regular;text-align: left; color: #b2b2b2;line-height: 40rpx;">
        <view class="submitserch" @click="returnvalue">搜索</view>
    </view>
  </template>
  
  <script>
  export default {
    props: {
        placeholder: {
        type: String,
        default: "请输入商品名称或商品编码/条形码",
      }
    },
    data() {
      return {
        searchvalue:''
      };
    },
    methods: {
      returnvalue() {
        console.log('123123')
        this.$emit("submit", this.searchvalue);
      },
    },
  };
  </script>
  
  <style scoped lang="scss">
    .search_contant{
        width: 650rpx;
        height: 64rpx;
        background: #f2f3f5;
        border-radius: 16rpx;
        margin: auto;
        display: flex; 
        justify-content: flex-start;
        align-items: center;
        padding: 0 8rpx 0 12rpx;
        .icon{
            width: 32rpx;
            height: 32rpx;
            margin-right: 10rpx;
        }
        .searchvalue{
            width: 520rpx;
        }
        .submitserch{
            width: 92rpx;
            height: 48rpx;
            background: #409eff;
            border-radius: 12rpx;
            font-size: 26rpx;
            font-family: PingFang SC, PingFang SC-Medium;
            font-weight: Medium;
            text-align: center;
            color: #ffffff;
            line-height: 48rpx;
        }
    }
  </style>
  